import request from '@/utils/request'

export default {
  // // 查询章节树
  // getChapterTree(courseId) {
  //   return request({
  //     url: `/eduService/chapter/getAllChapter/${courseId}`,
  //     method: 'get'
  //   })
  // },

  // 添加小节
  addVideo(video) {
    return request({
      url: `/eduService/video/addVideo`,
      method: 'post',
      data: video
    })
  },

  // 修改章节
  updateVideo(video) {
    return request({
      url: `/eduService/video/updateVideo`,
      method: 'post',
      data: video
    })
  },

  // 查询章节
  getVideoById(videoId) {
    return request({
      url: `/eduService/video/getVideoById/${videoId}`,
      method: 'get'
    })
  },

  // 删除章节
  deleteVideoById(videoId) {
    return request({
      url: `/eduService/video/deleteVideoById/${videoId}`,
      method: 'delete'
    })
  },

  // 删除视频
  deleteVideo(videoSourceId) {
    return request({
      url: `/vodService/video/deleteVideo/${videoSourceId}`,
      method: 'delete'
    })
  }
}

